<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="/WEB-INF/tld/jmesa.tld" prefix="jmesa" %> 
<%@ taglib prefix="c" uri="/WEB-INF/tld/c.tld" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>SWFUpload Demos - Classic Form Demo</title>
<link href="/estate/css/swfupload.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/estate/admin/swfUpload/swfupload.js"></script>
<script type="text/javascript" src="/estate/admin/simpleUpload/js/fileprogress.js"></script>
<script type="text/javascript" src="/estate/admin/simpleUpload/js/handlers.js"></script>
   <script type="text/javascript" src="/estate/js/calender.js "  ></script>
   <script type="text/javascript" src="/estate/js/lhgcore.js"></script>
	<script type="text/javascript" src="/estate/js/lhgcalendar.js"></script>
<script type="text/javascript">
		var swfu;

		window.onload = function () {
			swfu = new SWFUpload({
				// Backend settings
				upload_url: "fileUploadAction.action?method=upload&proId=${proId}&proCatagory=${proCatagory}",
				//file_post_name: "resume_file",

				// Flash file settings
				file_size_limit : "100000",
				file_types : "*.*",			// or you could use something like: "*.doc;*.wpd;*.pdf",
				file_types_description : "All Files",
				file_upload_limit : 0,
				file_queue_limit : 1,

				// Event handler settings
				swfupload_loaded_handler : swfUploadLoaded,
				
				file_dialog_start_handler: fileDialogStart,
				file_queued_handler : fileQueued,
				file_queue_error_handler : fileQueueError,
				file_dialog_complete_handler : fileDialogComplete,
				
				//upload_start_handler : uploadStart,	// I could do some client/JavaScript validation here, but I don't need to.
				swfupload_preload_handler : preLoad,
				swfupload_load_failed_handler : loadFailed,
				upload_progress_handler : uploadProgress,
				upload_error_handler : uploadError,
				upload_success_handler : uploadSuccess,
				upload_complete_handler : uploadComplete,

				// Button Settings
				button_image_url : "/estate/admin/simpleUpload/XPButtonUploadText_61x22.png",
				button_placeholder_id : "spanButtonPlaceholder",
				button_width: 61,
				button_height: 22,
				
				// Flash Settings
				flash_url : "/estate/admin/swfUpload/swfupload.swf",
				flash9_url : "/estate/admin/swfUpload/swfupload_fp9.swf",

				custom_settings : {
					progress_target : "fsUploadProgress",
					upload_successful : false
				},
				
				// Debug settings
				debug: false
			});

		};
	</script>
</head>
<body>

<div id="content">
	<form id="form1" action="fileUploadAction.action?method=write" enctype="multipart/form-data" method="post">
		<div class="fieldset">
			<span class="legend">请上传相关文件</span>
			
			<table style="vertical-align:top;">
				<tr style="height: 25">
					<td><label>项目名:</label></td>
					<td >${proName}</td>
				</tr>
				<tr style="height: 25">
					<td><label>项目编号:</label></td>
					<td >${proNum}</td>
				</tr>
				<tr>
					<td><label for="receiveDate">文件获取时间:</label></td>
					<td><input type="text" name="receiveDate" id="receiveDate" onclick="J.calendar.get();" readonly="readonly"/></td>
				</tr>
				<tr>
					<td><label for="fileCompany">文件公司:</label></td>
					<td><input type="text" name="fileCompany" id="fileCompany"/></td>
				</tr>
				<tr>
					<td><label for="txtFileName">文件:</label></td>
					<td>
						<div>
							<div>
								<input type="text" id="txtFileName"  style="border: solid 1px; background-color: #FFFFFF;" />
								<span id="spanButtonPlaceholder"></span>
								(10 MB MAX)
							</div>
							<div class="flash" id="fsUploadProgress">
								<!-- This is where the file progress gets shown.  SWFUpload doesn't update the UI directly.
											The Handlers (in handlers.js) process the upload events and make the UI updates -->
							</div>
							<input type="hidden" name="hidFileID" id="hidFileID" value="" />
							<!-- This is where the file ID is stored after SWFUpload uploads the file and gets the ID back from upload.php -->
						</div>
					</td>
				</tr>
				<tr>
					<td><label for="remark">备注:</label></td>
					<td><textarea name="remark" id="remark" cols="0" rows="0" style="width: 400px; height: 100px;"></textarea></td>
				</tr>
			</table>
			<br />
			<input type="submit" value="开始上传" id="btnSubmit" />
			<br/>
			<c:if test="${isNameVisible}">
			
			
				<label style="color: #ff0000;width: 500;text-align: center; ">文件${fileName}已经上传成功，如有需要请继续上传</label>
				
				</c:if>
		</div>
	</form>
</div>
</body>
</html>